import request from '@/utils/request'

const url = 'souvenir/product/'

export const addProduct = (data) => {
  return request({
    url: url + 'addProduct',
    method: 'post',
    data
  })
}

export const updateProduct = (data) => {
  return request({
    url: url + 'updateProduct',
    method: 'put',
    data
  })
}

export const deleteProduct = (productId) => {
  return request({
    url: url + 'deleteProduct' + '/' + productId,
    method: 'delete'
  })
}

export const getProductWithPage = (data) => {
  return request({
    url: url + 'getProductWithPage',
    method: 'post',
    data
  })
}

export const getProductById = (productId) => {
  return request({
    url: url + 'getProductById' + '/' + productId,
    method: 'get'
  })
}
